interface FetchRegistrationRecordAPIParams {
  page: string
  limit: string
}

interface FetchRegistrationRecordAPIResData {
  code: number
  msg: string
  time: string
  data: {
    data: Class[]
    current_page: number
    total: number
    per_page: number
    last_page: number
  }
}

/**
 * @description 分页获取报名记录列表
 */
export function fetchRegistrationRecordAPI(params: FetchRegistrationRecordAPIParams, token: string) {
  return httpInstance.get<FetchRegistrationRecordAPIResData, FetchRegistrationRecordAPIParams>(
    '/api/classes/recordlist',
    { params, headers: { token } },
  )
}
